# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=masscan
pkgver=1.0.5
pkgrel=1
pkgdesc="TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes."
url="https://github.com/robertdavidgraham/masscan"
arch="all"
license="AGPL-3.0-only"
makedepends="libpcap-dev linux-headers"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/robertdavidgraham/masscan/archive/$pkgver.tar.gz"

build() {
	make CC="${CC:-gcc}" CFLAGS="$CFLAGS -I."
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 doc/masscan.8 -t "$pkgdir/usr/share/man/man8"
}

sha512sums="55d58234994ebea10bcb3f45a24cdb51b020350faa116aee3a48861a119f66c339d1f533c978f52e37ccf5266be6fd2802765f13461d94eb28ec8d18c68e2f88  masscan-1.0.5.tar.gz"
